<!DOCTYPE html>
<html lang="zh">

<head>
	<link rel="icon" href="../Common/images/favicon.ico">
	<meta charset="utf-8" name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
	<title>QQ空间备份-收藏</title>
	<link rel="stylesheet" href="https://cdn.staticfile.org/font-awesome/4.7.0/css/font-awesome.min.css">
	<link rel="stylesheet" href="https://cdn.staticfile.org/bootstrap/4.6.1/css/bootstrap.min.css">
	
	<link rel="stylesheet" href="https://cdn.staticfile.org/lightgallery/2.3.0/css/lightgallery.min.css">
	<link rel="stylesheet" href="https://cdn.staticfile.org/lightgallery/2.3.0/css/lightgallery-bundle.min.css">
	
	<link rel="stylesheet" type="text/css" href="../Common/css/common.css">
	<script src="https://cdn.staticfile.org/jquery/3.6.0/jquery.min.js"></script>
	<script src="https://cdn.staticfile.org/jquery-mousewheel/3.1.13/jquery.mousewheel.min.js"></script>
	<script src="https://cdn.staticfile.org/bootstrap/4.6.1/js/bootstrap.bundle.min.js"></script>
	<script src="https://cdn.staticfile.org/lodash.js/4.17.21/lodash.min.js"></script>
	
	<script src="https://cdn.staticfile.org/lightgallery/2.3.0/lightgallery.min.js"></script>
	<script src="https://cdn.staticfile.org/lightgallery/2.3.0/plugins/zoom/lg-zoom.min.js"></script>
	<script src="https://cdn.staticfile.org/lightgallery/2.3.0/plugins/video/lg-video.min.js"></script>
	<script src="https://cdn.staticfile.org/lightgallery/2.3.0/plugins/thumbnail/lg-thumbnail.min.js"></script>
	<script src="https://cdn.staticfile.org/lightgallery/2.3.0/plugins/rotate/lg-rotate.min.js"></script>
	<script src="https://cdn.staticfile.org/lightgallery/2.3.0/plugins/fullscreen/lg-fullscreen.min.js"></script>
	<script src="https://cdn.staticfile.org/lightgallery/2.3.0/plugins/autoplay/lg-autoplay.min.js"></script>

	<script src="https://cdn.staticfile.org/jquery_lazyload/2.0.0-rc.2/lazyload.min.js"></script>
	<script src="https://cdn.jsdelivr.net/npm/template_js@2.2.1/dist/index.aio.min.js" integrity="sha256-gnK+GsIXEBgu/mJouMDtUxXvXM3M0jzxNYmjnlsifgY=" crossorigin="anonymous"></script>
	<script src="https://www.lvshuncai.com/custom/js/clicklove.min.js"></script>
	
	<script type="text/javascript" src="../Common/json/config.js"></script>
	<script type="text/javascript" src="../Common/js/common.js"></script>
	<script type="text/javascript" src="../Common/js/sidebar.js"></script>
	<script type="text/javascript" src="json/favorites.js"></script>
	<script type="text/javascript" src="js/favorites.js"></script>
</head>

<body>
	<header>
		<nav class="navbar navbar-expand-lg navbar-dark fixed-top bg-dark">
			<a class="navbar-brand" target="_blank" href="https://github.com/ShunCai/QZoneExport">QQ空间导出助手</a>
			<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
				<span class="navbar-toggler-icon"></span>
			</button>
			<div class="collapse navbar-collapse" id="navbarSupportedContent">
				<nav aria-label="breadcrumb">
					<ol class="breadcrumb bg-dark">
						<li class="breadcrumb-item"><a href="../index.html">个人中心</a></li>
						<li class="breadcrumb-item active" aria-current="page">收藏</li>
					</ol>
				</nav>
			</div>
		</nav>
	</header>
	<main role="main" class="flex-shrink-0">
		<div id="favorites_html" class="container favorites">
			<%for (const [year, yearMap] of dataMaps) {%>
				<span class="sidebar-h1" data-tag="h1" data-sidebar='<%:=year%>年<span class="badge badge-primary badge-pill itemSize"><%:=API.Utils.sumYearItemSize(yearMap)%><span>'></span>
				<%for (const [month, monthItems] of yearMap) {%>
					<span class="sidebar-h2" data-tag="h2" data-sidebar='<%:=month%>月<span class="badge badge-secondary badge-pill itemSize"><%:=monthItems.length%><span>'></span>
					<%for (let index = 0; index < monthItems.length; index++) {%>
						<%const favorite = monthItems[index]%>
						<%favorite.uid = 'QZFAV-' + API.Utils.newSimpleUid(16)%>
						<%total = total -1%>
						<div class="card w-70 mt-3 border">
							<div class="card-body">
								<div class="comments">
									<div class="comment p-0">
										<div class="d-flex justify-content-start ">
											<div class="comment-avatar">
												<a class="avatar p-0 m-0" target="_blank" href="<%:=API.Common.getUserUrl(API.Favorites.getFavoriteOwner(favorite).uin)%>">
													<img class="lazyload loading w-100 h-100 border rounded-circle" src="<%:=API.Common.getUserLogoLocalUrl(API.Favorites.getFavoriteOwner(favorite).uin, true)%>" >
												</a>
											</div>
											<div class="comment-infos ml-2">
												<a target="_blank" href="<%:=API.Common.getUserUrl(API.Favorites.getFavoriteOwner(favorite).uin)%>">
													<span><%:=API.Common.formatContent(API.Favorites.getFavoriteOwner(favorite).name, 'HTML', false, false, false, false, true)%></span>
												</a>
												<span class="border-warning border rounded text-warning small p-1"><%:=API.Favorites.getType(favorite.type)%></span>
												<div class="text-muted small mt-1"><%:=API.Common.formatContent(favorite.custom_create_time)%></div>
											</div>
										</div>
										<div class="messageText mt-2">
											<%if(favorite.shuoshuo_info && favorite.shuoshuo_info.reason  && favorite.shuoshuo_info.reason.trim() !== ''){%>
												<pre><%:=API.Common.formatContent(favorite.shuoshuo_info.reason,'HTML', false, true, false, false, true)%></pre>
												<hr>
											<%}%>
											<%if(favorite.share_info && favorite.share_info.reason  && favorite.share_info.reason.trim() !== ''){%>
												<pre><%:=API.Common.formatContent(favorite.share_info.reason,'HTML', false, true, false, false, true)%></pre>
												<hr>
											<%}%>
											<%if(favorite.type === 5){%>
												<%/* 说说 */%>
												<%if(favorite.shuoshuo_info && favorite.shuoshuo_info.detail_shuoshuo_info && favorite.shuoshuo_info.detail_shuoshuo_info.content){%>
													<pre><%:=API.Common.formatContent(favorite.shuoshuo_info.detail_shuoshuo_info.content,'HTML', false, false, false, false, true)%></pre>
												<%}else{%>
													<pre><%:=API.Common.formatContent(favorite.abstract || favorite.desp,'HTML', false, false, false, false, true)%></pre>
												<%}%>
											<%}else if(favorite.type === 7){%>
												<%/* 分享 */%>
												<%if(favorite.title && favorite.title.trim() !== ''){%>
													<pre><a target="_blank" href="<%:=API.Favorites.getShareUrl(favorite.share_info)%>"><%:=favorite.title%></a></pre>
												<%}%>
												<%if(favorite.abstract && favorite.abstract.trim() !== ''){%>
													<pre><%:=API.Common.formatContent(favorite.abstract || favorite.desp,'HTML', false, true, false, false, true)%></pre>
												<%}%>
											<%}else if(favorite.type === 3){%>
												<%/* 日志 */%>
												<%if(favorite.title && favorite.title.trim() !== ''){%>
													<pre><a target="_blank" href="http://user.qzone.qq.com/<%:=favorite.blog_info.owner_uin%>/blog/<%:=favorite.blog_info.id%>"><%:=favorite.title%></a></pre>
												<%}%>
												<%if(favorite.abstract && favorite.abstract.trim() !== ''){%>
													<pre><%:=API.Common.formatContent(favorite.abstract,'HTML', false, true, false, false, true)%></pre>
												<%}%>
											<%}else{%>
												<pre><%:=API.Common.formatContent(favorite.abstract || favorite.desp,'HTML', false, true, false, false, true)%></pre>
											<%}%>
										</div>
									</div>
								</div>
								<div id="<%:=favorite.uid%>" class='photo-detail' style="display:none">
									<div class="container">
										<div class="row">
											<div class="col text-white-50 text-left">
												<p>
													<i title="收藏时间" class="fa fa-clock-o text-primary"><%:=favorite.custom_create_time%></i>
												</p>
											</div>
											<div class="col text-white text-truncate">
												<%if(favorite.shuoshuo_info && favorite.shuoshuo_info.reason && favorite.shuoshuo_info.reason.trim() !== ''){%>
													<pre class="text-white" data-toggle="tooltip" data-html="true" title="<%:=API.Common.formatContent(favorite.shuoshuo_info.reason,'HTML', false, true, false, false, true)%>"><%:=API.Common.formatContent(favorite.shuoshuo_info.reason,'HTML', false, true, false, false, true)%></pre>
												<%}%>
												<%if(favorite.share_info && favorite.share_info.reason && favorite.share_info.reason.trim() !== ''){%>
													<pre class="text-white" data-toggle="tooltip" data-html="true" title="<%:=API.Common.formatContent(favorite.share_info.reason,'HTML', false, true, false, false, true)%>"><%:=API.Common.formatContent(favorite.share_info.reason,'HTML', false, true, false, false, true)%></pre>
												<%}%>
												<%if(favorite.type === 5){%>
													<%/* 说说 */%>
													<%if(favorite.shuoshuo_info && favorite.shuoshuo_info.detail_shuoshuo_info && favorite.shuoshuo_info.detail_shuoshuo_info.content){%>
														<pre class="text-white" data-toggle="tooltip" data-html="true" title="<%:=API.Common.formatContent(favorite.shuoshuo_info.detail_shuoshuo_info.content,'HTML', false, false, false, false, true)%>"><%:=API.Common.formatContent(favorite.shuoshuo_info.detail_shuoshuo_info.content,'HTML', false, false, false, false, true)%></pre>
													<%}else{%>
														<pre class="text-white" data-toggle="tooltip" data-html="true" title="<%:=API.Common.formatContent(favorite.abstract || favorite.desp,'HTML', false, false, false, false, true)%>"><%:=API.Common.formatContent(favorite.abstract || favorite.desp,'HTML', false, false, false, false, true)%></pre>
													<%}%>
												<%}else if(favorite.type === 7){%>
													<%/* 分享 */%>
													<%if(favorite.title && favorite.title.trim() !== ''){%>
														<pre class="text-white" data-toggle="tooltip" data-html="true"><a target="_blank" href="<%:=API.Favorites.getShareUrl(favorite.share_info)%>"><%:=favorite.title%></a></pre>
													<%}%>
													<%if(favorite.abstract && favorite.abstract.trim() !== ''){%>
														<pre class="text-white" data-toggle="tooltip" data-html="true" title="<%:=API.Common.formatContent(favorite.abstract || favorite.desp,'HTML', false, true, false, false, true)%>"><%:=API.Common.formatContent(favorite.abstract || favorite.desp,'HTML', false, true, false, false, true)%></pre>
													<%}%>
												<%}else if(favorite.type === 3){%>
													<%/* 日志 */%>
													<%if(favorite.title){%>
														<pre class="text-white" data-toggle="tooltip" data-html="true" title="<%:=favorite.title%>"><a target="_blank" href="http://user.qzone.qq.com/<%:=favorite.blog_info.owner_uin%>/blog/<%:=favorite.blog_info.id%>"><%:=favorite.title%></a></pre>
													<%}%>
													<%if(favorite.abstract && favorite.abstract.trim() !== ''){%>
														<pre class="text-white" data-toggle="tooltip" data-html="true" title="<%:=API.Common.formatContent(favorite.abstract,'HTML', false, true, false, false, true)%>"><%:=API.Common.formatContent(favorite.abstract,'HTML', false, true, false, false, true)%></pre>
													<%}%>
												<%}else{%>
													<pre class="text-white" data-toggle="tooltip" data-html="true" title="<%:=API.Common.formatContent(favorite.abstract || favorite.desp,'HTML', false, true, false, false, true)%>"><%:=API.Common.formatContent(favorite.abstract || favorite.desp,'HTML', false, true, false, false, true)%></pre>
												<%}%>
											</div>
											<div class="col"></div>
										</div>
									</div>
								</div>
								<%/* 多媒体内容 */%>
								<div class="medias row p-3 lightgallery <%:=API.Common.getImgClassType(favorite)%>">
									<%/* 视频内容 */%>
									<%if(favorite.custom_videos){%>
										<%let imgIdex = 0%>
										<%for(let video of favorite.custom_videos){%>
											<% video.vid = 'QZ-' + API.Utils.newSimpleUid(16); %>
											<%if(video.play_url){%>
												<a class="medias-item border message-lightbox-external" target="_blank" href="<%:=video.play_url%>">
													<span class="message-video"></span>
													<img class="lazyload loading w-100 h-100" data-src="<%:=video.custom_pre_filepath || video.preview_img%>">
												</a>
											<%}else{%>
												<a class="medias-item border message-lightbox"  data-video='{"source": [{"src":"<%:=video.custom_filepath || video.url%>", "type":"video/mp4"}],"attributes": {"preload": false, "controls": true}}' 
													data-poster="<%:=video.custom_pre_filepath || video.preview_img%>" data-sub-html="#<%:=favorite.uid%>">
													<span class="message-video"></span>
													<img class="lazyload loading w-100 h-100" data-idx="<%:=imgIdex%>" data-src="<%:=video.custom_pre_filepath || video.preview_img%>" />
												</a>
												<%imgIdex++%>
											<%}%>
										<%}%>
									<%}%>
									<%/* 图片内容 */%>
									<%if(favorite.custom_origin_images || favorite.custom_images){%>
										<%let imgIdex = 0%>
										<%let favImages = favorite.custom_origin_images || favorite.custom_images%>
										<%for(let image of favImages){%>
											<a class="medias-item border message-lightbox" target="_blank" href="<%:=image.custom_filepath || image.custom_url%>" data-sub-html="#<%:=favorite.uid%>">
												<img class="lazyload loading w-100 h-100" data-idx="<%:=imgIdex%>" data-src="<%:=image.custom_filepath || image.custom_url%>">
											</a>
											<%imgIdex++%>
										<%}%>
									<%}%>
								</div>
								<%/* 音乐内容（目前PC端已无法正常播放，直接显示专辑图片与歌曲信息） */%>
								<%if(favorite.custom_audios && favorite.custom_audios.length > 0){%>
									<div class="medias row p-3 ml-5 border">
										<ul class="list-unstyled">
											<%let imgIdex = 0%>
											<%for(let music of favorite.custom_audios){%>
												<li>
													<a class="medias-item text-center message-lightbox" href="<%:=music.playurl || music.play_url%>" data-sub-html="#<%:=favorite.uid%>">
														<img class="lazyload loading w-100 h-100" data-idx="<%:=imgIdex%>" data-src="<%:=music.custom_filepath || music.custom_url%>">
														<span><%:=music.song_name%></span>
													</a>
												</li>
												<%imgIdex++%>
											<%}%>
										</ul>
									</div>
								<%}%>
							</div>
							<div class="card-footer text-muted">
								<span class="border-primary border rounded text-primary small p-1 float-right" title="当前楼层">#<%:=total + 1 %></span>
							</div>
						</div>
					<%}%>
				<%}%>
			<%}%>
		</div>
	</main>
</body>

</html>